package cn.lanqiao.entity;

import java.io.Serializable;

public class Near implements Serializable,Comparable<Object> {

	private static final long serialVersionUID = 1L;

	 //课程考试名称
    private String source;
	//剩余时间
	private long daysBetween;
	 //考试日期
    private String examDate;
	
    public Near() {

    }

    public Near(String source, long daysBetween, String examDate) {
		super();
		this.source = source;
		this.daysBetween = daysBetween;
		this.examDate = examDate;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public long getDaysBetween() {
		return daysBetween;
	}

	public void setDaysBetween(long daysBetween) {
		this.daysBetween = daysBetween;
	}

	public String getExamDate() {
		return examDate;
	}

	public void setExamDate(String examDate) {
		this.examDate = examDate;
	}

	@Override
	public int compareTo(Object o) {
		Near near = (Near) o;
		if( this.getDaysBetween()>near.getDaysBetween() ) {
			return 1;
		}else if ( this.getDaysBetween()<near.getDaysBetween() ) {
			return -1;
		}else {
			return 0;
		}
	}
	
}
